package com.ly.im.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author ly
 * @description 消息表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("message")
public class Message {

    /**
     * id
     */
    @TableId(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 来源id
     */
    @TableField("from")
    private Long from;

    /**
     * 给谁
     */
    @TableField("to")
    private Long to;

    /**
     * 类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 内荣
     */
    @TableField("content")
    private String content;

    /**
     * 时间
     */
    @TableField("time")
    private Date time;

}
